package entity;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class Result {


    private boolean flag;
    private Integer code;
    private String message;
    private Object data;


    public Result(boolean flag, Integer code, String message, Object data) {
        super();
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Result(boolean flag, Integer code, String message) {
        super();
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public Result(Object data) {
        this.data = data;
        this.code = StatusCode.OK;
        this.message = "操作成功";
    }


}
